<template>
	<view class="myHelpPage">
		<view class="myHelpContent" v-for="(item ,index) in myHelpList" :key="item.id">
			<u--form labelPosition="left" ref="form1" labelWidth="auto">
				<u-form-item label="姓名" prop="userInfo.name" borderBottom >
					<u--input v-model="item.userName" border="none" disabled></u--input>
				</u-form-item>
				<u-form-item label="联系电话" prop="userInfo.phone" borderBottom >
					<u--input v-model="item.phone" border="none" disabled>{{}}</u--input>
				</u-form-item>
				<u-form-item label="位置" prop="userInfo.position" borderBottom >
					<u--input v-model="item.locationAddress" border="none" disabled></u--input>
				</u-form-item>
				<u-form-item label="详细位置描述" prop="userInfo.positionInfo" borderBottom >
					<u--textarea v-model="item.locationName" disabled autoHeight boder></u--textarea>
				</u-form-item>
				<u-form-item label="情况描述" prop="userInfo.circumstances" borderBottom >
					<u--textarea v-model="item.detail" disabled autoHeight boder></u--textarea>
				</u-form-item>
				<u-form-item label="紧急程度" prop="userInfo.UrgentDegree" borderBottom >
					<u--input disabled v-if="item.isUrgent == 0" placeholder="暂不清"></u--input>
					<u--input disabled v-else-if="item.isUrgent == 1" placeholder="中等"></u--input>
					<u--input disabled v-else placeholder="紧急"></u--input>
				</u-form-item>
			</u--form>
		</view>
	</view>
</template>

<script>
	import request from '@/utills/request.js'
	export default {
		data() {
			return {
				myHelpList: ''
			}
		},
		onLoad() {
			this.getMyHelp();
		},
		methods: {
			async getMyHelp() {
				let res = await request({
					method: 'get',
					url: 'user/myHelp'
				})
				console.log(res);
				if (res.data.code == 200) {
					this.myHelpList = res.data.data
				}
			}
		}
	}
</script>

<style>
	page {
		background-color: #eff5f6;
	}

	.myHelpPage {
		padding: 15px;
	}

	.myHelpContent {
		background-color: #fff;
		border-radius: 8px;
		padding: 15px;
		margin-bottom: 15px;
	}
</style>
